<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>发表博客</title>
<meta name="description" content="彰显网络商务价值 实现创新职业梦想">
<meta name="keywords" content="互联网,大学生,大赛,电子商务,创业,就业,实践,有奖活动,网络商务,实践,海峡两岸,大学生竞赛,实践教学,高新民,校企合作">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css">
<link rel="stylesheet" type="text/css" href="__CSS__/Version4Master.css">
<link rel="stylesheet" type="text/css" href="__CSS__/newblog.css">
<link rel="stylesheet" type="text/css" href="__CSS__/thickbox.css">
<script src="__INCLUDE__/kindeditor/kindeditor-min.js" type="text/javascript"></script>
<script src="__INCLUDE__/kindeditor/lang/zh_CN.js" type="text/javascript" ></script>
<script>
		var editor;
		KindEditor.ready(function(K) {
			editor = K.create('#kindContent', {
				resizeType : 1,
				items : [
					'html','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
					'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
					'insertunorderedlist', '|', 'emoticons', 'image', 'link']
			});
		});
</script>
</head>
<body>
<div id="container">
	<!--header start-->
	<include file="./Match/Tpl/Include/header.html" /> 
	<!--header stop-->
	<div class="clear"> </div>
	<div id="content">
		<div id="title"> 
			<a class="float_right" href="{:U('Public/Index/index')}">返回个人主页</a>
			<h2>
				<if condition="$info.Id neq 0"> 编辑博文
				<else /> 发表新博文
				</if>
			</h2>
		</div>
		<form id="aspnetForm" method="post" name="aspnetForm" action="__URL__/addBlogCom" onsubmit="return dosubmit()">
			<div id="editorHolder">
				<input type="hidden" name="blogid" value="{$info.Id}" />
				<div class="edit_item">
					<input id="Title" class="inupt_text" name="Title" maxLength="50" type="text" onblur="doCheckTitle()" value="{$info.Title}">
					<span id="TitleTip"></span>
				</div>

				<div class="edit_item">
					<textarea id="kindContent" style="width:700px;height:200px;" name="Content">{$info.Content}</textarea>

				</div>
				<div style="margin-top: 10px;" class="edit_item">
				<label class="legend"> 添加标签:</label>
				<input id="Tags" class="inupt_text tags"  name="Tags" type="text" value="{$info.Tags}" onblur="doCheckTags()" />
				标签之间请使用逗号(,)隔开
				<span id="TagsTip"></span>
				</div>
				<div id="CheckList" class="edit_item">
					<label class="legend"> 选择团队:</label>
					<span>
					<volist name="team" id="vo" key="k">
						<input id="team{$k}" name="Team" type="radio" value="{$vo.Id}">
						<label for="team{$k}">{$vo.Name}</label>
					</volist>
					</span> 
				</div>
			</div>
			<div id="operate">
				<input id="Submit" class="input-button" name="Submit" value="发布" type="submit">
				<input class="input-button gray" value="返回" type="button">
			</div>
		</form>
	</div>
	<div class="clear"> </div>
	<include file="./Match/Tpl/Include/footer.html" /> 
</div>
<script type="text/javascript">
	function doCheckTitle(){
		var name = document.aspnetForm.Title.value;
		if(name==''){
			document.getElementById("TitleTip").innerHTML="标题必须填写！";
			document.getElementById("TitleTip").style.color="red";
			return false;
		}else{
			document.getElementById("TitleTip").innerHTML="正确";
			document.getElementById("TitleTip").style.color="green";
			return true;
		}
	}
	
	function doCheckTags(){
		var name = document.aspnetForm.Tags.value;
		if(name==''){
			document.getElementById("TagsTip").innerHTML="标签必须填写！";
			document.getElementById("TagsTip").style.color="red";
			return false;
		}else{
			document.getElementById("TagsTip").innerHTML="正确";
			document.getElementById("TagsTip").style.color="green";
			return true;
		}
	}
	
	function dosubmit(){
		return (doCheckTitle() && doCheckTags());
	}
</script>
</body>
</html>